$(function(){
	
	silder() ; 
});


function silder() {
	var slidesUl = $("#slidesUl") ;
	
	$.post($.site.ctx.baseUrl + "/front/site/magic.do?identity=indexMagic", function(result){
		if(result) {
			slidesUl.empty() ;
			$.each(result, function(i, p){ 
				slidesUl.append("<li style='background:url("+p.path+") 50% 0 no-repeat;'></li>") ;
			}); 
			sliderConfig() ;
		}
	}, "JSON") ;
	
}

function sliderConfig() {
	$.goup({
        trigger: 100,
        bottomOffset: 150,
        locationOffset: 100,
        titleAsText: true,
    });
	
	$('.flexslider').flexslider({
		directionNav: true,
		pauseOnAction: false
	});
}

 